1. Technical Field
The present invention relates generally to software development and more particularly to software con figuration management databases.
2. Discussion of Prior Art
Software products are often developed by hundreds or thousands of people. To manage this increasingly complex process, software development is handled by project teams. In addition to the team working on the current product, there may be a team that handles support for a previously released product, a team working on specialized versions of a product for specific customers, and a team handling future releases. Each of these teams may also be currently building numerous versions.
This has necessitated a distributed approach to development. Rather than incorporating all of the code for a software system into a single file, developers create smaller files that handle smaller parts of an overall system. Thus, one file may depend on a number of different files or objects. Therefore, changes to one file may affect the operation of other files in a product build. Changes to these interrelated files collected in a repository are called a "change set" and together they represent the progress of a program from one coherent state to another.
This complexity has necessitated the use of project databases called software configuration management (SCM) systems. Commercial SCM software is used to manage these databases and to help insure that a change set is updated and committed to the database all at once. In order to accomplish this task, SCM software usually provides version control, workspace management, build management, and process control.
Although SCM software is helpful, some problems are not addressed. Of particular concern is the duration of multi-part operations, which is the time between the initiation of a change to a set of files (start boundary) and the time it is completed (end boundary). During that time, some of the change set files have been updated while others have not. Thus, the repository is in an incoherent state and should not be used to build a working product. In order to prevent accidental reads or writes during an update, most SCM software employs a file-locking mechanism.
One prior art solution places write file locks (wfl) on each directory that will be modified during an update. Although this prevents incoherence during and after an update, there is no guarantee that files read just prior to the update will be consistent with other files read after the update. Although it is unlikely, if an update reads one directory before a commit places a wfl on that directory, and then, after a commit places a wfl on a second directory, the update attempts to read the second list, then when the update logic encounters the wfl, the update logic waits for the wfl to clear and then reads that part of the change into the updated workspace. This results in an incoherence that may or may not be detected when the workspace is used to build the product. This incoherence problem is exacerbated when the user or programmer is working on a project at a remote site, in which case he or she must retrieve the entire change set. Remote retrieval is slower and therefore opens a longer time window of opportunity for an incoherent set.
In addition to the locking method described above, some SCM software locks individual element versions during a write operation. Although protecting a transaction at the element version level guarantees either complete success or complete failure as to an individual file, it is possible for a multi-part transaction to write only some of the files involved. This leaves the repository incoherent. While reading an incoherent file of a file set is problematic, having an incoherent file set stored in the repository is potentially disastrous.
There remains, therefore, a need for a mechanism to guarantee coherent views of a repository at the beginning and ending boundaries of multi-part operations. Additionally, a method is needed for detecting and recovering from repository inconsistencies caused by system failures during multi-part operations.